﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AirplaneReservation
{
    public partial class WUC_DropDownListCalendar : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack==false)
            {
                txtDate.Text = DateTime.Today.ToString("MM/dd/yyyy");
            }
        }

        protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
        {
            if (Calendar1.Visible == false)
                Calendar1.Visible = true;
            else
            {
                Calendar1.Visible = false;
                txtDate.Text = Calendar1.SelectedDate.ToString("MM/dd/yyyyy");
            }
        }

        protected void Calendar1_SelectionChanged(object sender, EventArgs e)
        {
            txtDate.Text = Calendar1.SelectedDate.ToString("MM/dd/yyyyy");
        }


    }
}